package top.yehot.cmmu.spring.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import top.yehot.cmmu.spring.interceptor.ResponseResultInterceptor;

/**
 * 配置拦截器
 * 
 * @author lquan
 * @date 2022年4月2日 下午4:29:23
 */
@Configuration
public class ResponseResultConfig implements WebMvcConfigurer {

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new ResponseResultInterceptor()).addPathPatterns("/**");
	}
	
}
